MRTG : Get Httpd Process Count
2015/01/25 |
Configure MRTG to display httpd Processes count.
|
|
[1] | Configure MRTG. |
[root@dlp ~]#
vi /etc/snmp/snmpd.conf # near line 205: add proc httpd
[root@dlp ~]#
/etc/rc.d/init.d/snmpd restart Stopping snmpd: [ OK ] Starting snmpd: [ OK ]
[root@dlp ~]#
vi /etc/mrtg/mrtg.cfg # add follows to the end (replace the "Serverworld" to your comunity name) Target[httpd]: .1.3.6.1.4.1.2021.2.1.5.1&.1.3.6.1.4.1.2021.2.1.4.1:Serverworld@127.0.0.1 MaxBytes[httpd]: 50 Unscaled[httpd]: dwmy Options[httpd]: gauge, growright, nopercent YLegend[httpd]: Count ShortLegend[httpd]: proc(s). Title[httpd]: Httpd Processes LegendI[httpd]: Processes LegendO[httpd]: Legend1[httpd]: Httpd Processes Legend2[httpd]: PageTop[httpd]: <h1>Httpd Processes</h1> # execute mrtg 3 times (display warnings until 3 times) [root@dlp ~]# for (( i=1 ; i <= 3 ; i++ )); do env LANG=C mrtg /etc/mrtg/mrtg.cfg; done 2015-01-27 16:42:18, Rateup WARNING: /usr/bin/rateup could not read the primary log file for httpd 2015-01-27 16:42:18, Rateup WARNING: /usr/bin/rateup The backup log file for httpd was invalid as well 2015-01-27 16:42:18, Rateup WARNING: /usr/bin/rateup Can't remove httpd.old updating log file 2015-01-27 16:42:18, Rateup WARNING: /usr/bin/rateup Can't rename httpd.log to httpd.old updating log file # generate index file [root@dlp ~]# indexmaker --columns=1 /etc/mrtg/mrtg.cfg > /var/www/mrtg/index.html
|
[2] | Access to the "http://(MRTG hostname or IP address)/mrtg/" from a client with HTTP, then it's possible to see Httpd process count. |